package ws;

import java.rmi.RemoteException;

import ws.loushang.IServicePublisherSoap11BindingStub;
import ws.loushang.SzshDataExchangeServicePublisherLocator;
import ws.loushang.SzshDataExchangeServicePublisherPortType;
import ws.loushang.SzshDataExchangeServicePublisherPortTypeProxy;

public class Test {  
  
    /** 
     * 利用axis调用webservice实例 
     * @param args 
     */  
    public static void main(String[] args) {  
    	
    	String ab;
          
        try {  
            //换成对应的proxy类  
            SzshDataExchangeServicePublisherPortTypeProxy proxy = new SzshDataExchangeServicePublisherPortTypeProxy();  
            proxy.setEndpoint("http://119.164.253.144:9080/dataexchange/services/szshDataExchange.servicePublisher?wsdl");  
            //换成获取对应的serice  
            //SzshDataExchangeServicePublisherPortType service =  proxy.getSzshDataExchangeServicePublisherPortType();  
            //调用web service提供的方法 
            String result = proxy.queryBaseInfo("91370105MA3C7EKH62", null, null, null);  
              
            System.out.println(result);  
        	/*SzshDataExchangeServicePublisherLocator locator = new SzshDataExchangeServicePublisherLocator();
        	java.net.URL url = new java.net.URL("http://119.164.253.144:9080/dataexchange/services/szshDataExchange.servicePublisher?wsdl");
        	IServicePublisherSoap11BindingStub stub = new IServicePublisherSoap11BindingStub(url, locator);
        	String result = stub.queryBaseInfo("91370100306936143X", null, null, null);
        	System.out.println(result);*/
        } catch (Exception e) {  
            e.printStackTrace();  
        }  
  
    }  
}  
